﻿using System;
using System.Collections.Generic;
using System.Text;
using Common.Configuration;

namespace Common.BasePages
{
    public  class ProcessBasePage:BasePage
    {
        public string StepName
        {
            get
            {
                return Request.QueryString["StepName"];
            }

        }
        /// <summary>
        /// 获取域名
        /// </summary>
        public string DomainName
        {
            get
            {
                return ConfigurationManager.AppSettings["DomainName"];
            }
        }

        /// <summary>
        /// 步骤ID
        /// </summary>
        public string StepID
        {
            get
            {
                return Request.QueryString["StepID"];
            }
        }
        string _processName = string.Empty;
        /// <summary>
        /// 流程名
        /// </summary>
        public string ProcessName
        {
            get
            {
                if (string.IsNullOrEmpty(_processName))
                {
                    _processName = Request.QueryString["ProcessName"];
                }
                return _processName;
            }
            set
            {
                _processName = value;
            }
        }
        /// <summary>
        /// 实例号
        /// </summary>
        public string Incident
        {
            get
            {
                return Request.QueryString["Incident"];
            }
        }
        ///// <summary>
        ///// 
        ///// </summary>
        //public string UserName
        //{
        //    get
        //    {
        //        return UserInfo.AD_ACCOUNT;
        //    }
        //}
        public string TaskId
        {
            get
            {
                return Request.QueryString["TaskID"];
            }
        }
        private Guid _Guid;
        public Guid GUID
        {
            get
            {
                if (ViewState["Guid"] == null)
                {
                    ViewState["Guid"] = Guid.NewGuid();
                }
                _Guid = (Guid)ViewState["Guid"];
                return _Guid;
            }
            set
            {
                ViewState["Guid"] = value;
            }
        }

        private string _StartStepName;
        public string StartStepName
        {
            get
            {
                return _StartStepName;
            }
            set
            {
                _StartStepName = value;
            }
        }

        private Guid _MGuid;
        public Guid MGuid
        {
            get
            {
                if (ViewState["MGuid"] == null)
                {
                    ViewState["MGuid"] = Guid.NewGuid();
                }
                _MGuid = (Guid)ViewState["MGuid"];
                return _MGuid;
            }
            set
            {
                ViewState["MGuid"] = value;
            }

        }
    }
}
